﻿<div ng-controller="manageController">
	<div class="wrapper border-bottom white-bg page-heading">
		<div class="col-lg-pull-12">
			<ol class="breadcrumb">
				<li><a ui-sref="app.manage.manage">账号权限</a></li>
				<li class="active" ng-bind="breadcrumb"></li>
			</ol>
		</div>
	</div>
    <form name="_form" class="form-horizontal w5c-form" w5c-form-validate="model.validateOptions" role="form" novalidate>
        <div class="form-group">
            <label class="col-sm-2 control-label">OEM商户</label>
            <div class="col-sm-3">
                <ui-select ng-model="model.oem_id" theme="bootstrap">
                    <ui-select-match placeholder="选择OEM商户">{{$select.selected.name}}</ui-select-match>
                    <ui-select-choices repeat="item.id as item in oems | propsFilter: {name: $select.search}">
                        <span ng-bind="item.name"></span>
                    </ui-select-choices>
                </ui-select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">名称:</label>
            <div class="col-sm-3">
                <input type="text" name="nick" class="form-control input-sm" ng-model="model.nick" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">账号:</label>
            <div class="col-sm-3">
                <input type="text" name="mobile" class="form-control input-sm" ng-model="model.mobile" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">账号权限:</label>
            <div class="col-sm-3">
                <select name="role_id" class="form-control input-sm" ng-model="model.role_id" ng-options="item.id as item.name for item in roles"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"></label>
            <div class="col-sm-3">
                <button type="submit" w5c-form-submit="save()" class="btn btn-primary btn-sm" btn-loading="psdisabled" loading-text="保存中..." ng-disabled="psdisabled">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button type="submit" w5c-form-submit="reset()" class="btn btn-primary btn-sm">
                    <i class="fa fa-save"></i> 重置密码
                </button>
                <button ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 取消</button>
            </div>
        </div>
    </form>
</div>